#!/bin/bash
export LD_LIBRARY_PATH=/home/lisian/packages/radar_dara_collector/devel/lib:/opt/ros/noetic/lib
rm -rf points_*.bag
source devel/setup.bash
echo "----Info: Start to record..."
timeout 35s rosbag record -a -o points.bag

mv points_*.bag points.bag

rm -rf pcds
mkdir pcds
rosrun pcl_ros bag_to_pcd points.bag /livox/lidar pcds


./concatenate_points/build/concatenate_points_pcd pcds/*.pcd
echo "----Info Generating PCD Files Done..."


export LD_LIBRARY_PATH=/opt/ros/noetic/lib:/opt/MVS/lib/64:/opt/MVS/lib/32:/opt/MVS/lib/64:/opt/MVS/lib/32:/opt/MVS/lib/64:/opt/MVS/lib/32:
./HIKCam/build/hkcam
cp output.pcd ~/share/0.pcd
cp image.jpg ~/share/0.jpg